</<?php 
$p1=new product();
$p2=new product();
var_dump($p1,$p2);
class Shoopcoduct{
    public $little        ="商品名称";
    public $producerName  ="制造商名称";
    public $place         ="产地";
    public $rice          =0;
    private $discount     =0;
    protected $sell       =1;
    function_construct($title,$producerName,$place,$rice ){
              this->title            =$title;
              this->producerName     =$producerName;
              this->place            =$place;
              this->rice             =$rice;
    }
    public function gettitle($vaule =''){
        return $this->title;
    }
      public function gettitle($vaule =''){
        return $this->sell;
    }
}

$producer1=new ShopProduct();
//echo $producer1->title;
//echo '<br/>';
// //改变对象的属性;
//$producer1->title='书籍'；
//echo $producer1->title;

echo $producer1->getTitle();
echo $producer1->getSell();
$p2=new ShopProduct('背单词3000','北京人民出版社','北京',134);
$producer3 =new ShopProduct('《信息简史》','人民邮电出版社','北京',69);
//echo $p2->title;
 echo $producer3->title; 
//以下内容会报错，private和protacted属性不能在对象中访问
//echo $producer->discount;
//echo $producer1->sell;
?>